package cn.ultrarisk.scadmin.manager.biz.user.util;

import cn.ultrarisk.scadmin.manager.biz.context.RequestContext;
import cn.ultrarisk.scadmin.manager.biz.user.entity.Admin;

/**
 * SessionUtil
 *
 * @author sevendlong(lin23871@163.com)
 * @date 2014/6/4
 * @since V1.0
 */
public class SessionUtil {
    public static void setAdmin(Admin admin) {
        RequestContext.getRequest().getSession().setAttribute("admin", admin);
    }

    public static Admin getAdmin() {
        return (Admin) RequestContext.getRequest().getSession().getAttribute("admin");
    }
}
